import request from '@/utils/request'

const BASE_URL = '/outbound/outBoundOrder'

// 分页查询
export function queryOutboundOrderPageList(data) {
  return request({
    url: BASE_URL + '/queryOutboundOrderPageList',
    method: 'post',
    data
  })
}

// 查询出库单详情
export function getOutboundOrderInfo(data) {
  return request({
    url: BASE_URL + '/getOutboundOrderInfo',
    method: 'post',
    data
  })
}

// 出库下单
export function addOutboundOrder(data) {
  return request({
    url: BASE_URL + '/addOutboundOrder',
    method: 'post',
    data
  })
}

// 修改入库单收件人
export function modifyOutboundOrderReceive(data) {
  return request({
    url: BASE_URL + '/modifyOutboundOrderReceive',
    method: 'post',
    data
  })
}

// 出库单商品查询
export function getOutboundOrderGoodsInfo(data) {
  return request({
    url: BASE_URL + '/getOutboundOrderGoodsInfo',
    method: 'post',
    data
  })
}

// 出库流程记录查询
export function getOutboundOrderStatusLog(data) {
  return request({
    url: BASE_URL + '/getOutboundOrderStatusLog',
    method: 'post',
    data
  })
}

// 出库客户下单金额详情查询
export function getOutboundOrderAmountCustomer(data) {
  return request({
    url: BASE_URL + '/getOutboundOrderAmountCustomer',
    method: 'post',
    data
  })
}

// 出库物流渠道金额详情查询
export function getOutboundOrderAmountProvider(data) {
  return request({
    url: BASE_URL + '/getOutboundOrderAmountProvider',
    method: 'post',
    data
  })
}

// 出库图片查询
export function getOutboundOrderPicture(data) {
  return request({
    url: BASE_URL + '/getOutboundOrderPicture',
    method: 'post',
    data
  })
}

// 取消订单
export function setOrderStatusCancel(data) {
  return request({
    url: BASE_URL + '/setOrderStatusCancel',
    method: 'post',
    data
  })
}

// 下载订单附件
export function downloadFile(data) {
  return request({
    url: BASE_URL + '/downloadFile',
    method: 'post',
    data
  })
}
// 获取物流商渠道
export function getChannels() {
  return request({
    url: '/provider/providerChannel/getChannels',
    method: 'get'
  })
}
// 获取出库单记录
// export function getStockBatchLogList(orderNo) {
//   return request({
//     url: '/stockBatchLog/getStockBatchLogList/' + orderNo,
//     method: 'post'
//   })
// }

export function getImportOrderList(data) {
  return request({
    url: BASE_URL + '/selectImportByOrderId',
    method: 'post',
    data
  })
}
